package com.liuyz.decorator_;

public class Test {

    public static void main(String[] args) {
        // 构建处理流，调用处理流封装后的方法，具体实现逻辑由构造器传入的节点流决定
        BufferedReader_ reader_1 = new BufferedReader_(new FileReader_());
        reader_1.readFiles(10);
        System.out.println("---");
        BufferedReader_ reader_2 = new BufferedReader_(new StringReader_());
        reader_2.readStrings(5);
        System.out.println("---");
        reader_2.readFiles(5);
        System.out.println("---");
    }
}
